home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / gfx / 3d / uvsurf.lha / uvSurf.doc < prev    next >
Text File  |  1992-09-14  |  8KB  |  201 lines

  1.  
  2.           uvSurf v2.02 Doc file, (c) 1992 Nicolas Dade.
  3.  
  4. uvSurf is a program which lets you generate, look at and save (both
  5. images and 3-d objects) surfaces of two parameters.
  6.  
  7. It runs equally under both 2.0 and 1.3.
  8.  
  9. It can be started from a CLI or from workbench.
  10.  
  11. From workbench it takes the following tooltypes:
  12.  
  13. HIRES
  14.  If present, the screen opened is a hires, interlaced screen.
  15.  Without it a lores non-interlaced screen is used.
  16.  
  17. SCFONT=font.name height
  18.  Specifies the font to be used as the screen's font (which appears
  19.  in the title bar and in the string gadgets). The OS will insist
  20.  the the screen's font be mono-spaced.
  21.  
  22. GGFONT=font.name height
  23.  Specifies the font to be used with the gadgets, except for the
  24.  interior of string gadgets, which appear in the screen font.
  25.  
  26. IMFONT=font.name height
  27.  Specifies the font to be used when drawing on the image (the
  28.  coordinates and the labels on the axis).
  29.  
  30. For example, if you wanted uvSurf to use a hires screen and the
  31. times.font of height 24 for its gadgets, your tooltypes would be
  32.  
  33. HIRES
  34. GGFONT=times.font 24
  35.  
  36.  
  37. From a CLI the same options are available.
  38.  
  39. -hires
  40.  makes uvSurf use a hires interlaced screen and
  41.  
  42. -scfont name.font height
  43. -ggfont name.font height
  44. -imfont name.font height
  45.  specify the screen, gadget and image fonts.
  46.  
  47. For example, if you wanted uvSurf to use a hires screen and the
  48. times.font of height 24 for its gadgets, you'd do something like
  49.  
  50. uvSurf -hires -ggfont times.font 24
  51.  
  52. The order in which the -xx arguments appear is not important,
  53. however the two words following a font specifying argument must be
  54. the font name and height. Fonts who's names contain a space should
  55. be renamed or aliased by using links :)
  56.  
  57. uvSurf ?
  58. will just dump version and copyright information.
  59.  
  60.  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  61.  
  62. Once you get uvSurf going it will show you a screen which looks
  63. somewhat like this:
  64.  
  65.     X(u,v) [_________________________________]
  66.     Y(u,v) [_________________________________]
  67.     Z(u,v) [_________________________________]
  68.  
  69.   u Min [________] u Step [________] u Max [________]
  70.   v Min [________] v Step [________] v Max [________]
  71.  
  72.          [Compute & Display] [Exit uvSurf]
  73.  
  74. uvSurf wants three functions of u and v, and the start, step and end
  75. numbers for u and v. Once these are entered clicking on [Compute &
  76. Display] starts the computations of X,Y,Z, and other things, and
  77. once the computations are finished, the rendering of the image.
  78. Clicking on [Exit uvSurf] does just what you think it does.
  79.  
  80. See the included file NiceEquations for some ideas. The functions
  81. known are: +, -, *, /, ^ (power), abs, sign (-1, 0 or 1), sqr, max
  82. (of two numbers), min (same), sin, cos, tan, asin, acos, atan, exp,
  83. ln, hsin, hcos, and htan. uvSurf knows the constants e and pi, and
  84. the variables u and v.
  85.  
  86. The u and v Min, Step and Max string are really equations just like
  87. X(u,v), Y(u,v) and Z(u,v), so you may enter "pi/2" instead of
  88. "1.5707...". However using the variables u and v in these equations
  89. will lead you to trouble.
  90.  
  91. If uvSurf can't understand one of your entries it will return to you
  92. and place the cursor on the first letter of the undecipherable word.
  93.  
  94. If uvSurf cannot allocate enough memory for its tables it will
  95. return to you, placing the cursor in the u Step box, which is a hint
  96. to you to increase u Step and/or v Step in order to reduce the
  97. number of verticies.
  98.  
  99.  
  100. While uvSurf is computing a bar is shown which fills to indicate
  101. what percent of the floating-point computations are finished. _Any_
  102. sort of floatingpoint chip and/or accelerator board helps greatly at
  103. this stage. The computations can be interrupted by a break (ctrlc-c)
  104. signal, which will return you to the "enter equations" stage. At
  105. this stage second ctrl-c will exit uvSurf.
  106.  
  107.  
  108. Once uvSurf is ready to display the surface, it changes the screen
  109. colors and renders the surface. The following commands are then
  110. available:
  111.  
  112. ESC    go back to "enter equations" stage.
  113. a    toggle axis drawn / not drawn
  114. p    toggle perspective / orthogonal projections. The perspective
  115.     projection draws the object as if its maximum depth where
  116.     1/4 the distance between your eye and the monitor.
  117. n    toggles normals used to eliminate backside of surface /
  118.     all quadrangles drawn
  119. r    reverses the normals so that the other side becomes the
  120.     backside.
  121. s    draws the surface stepping through it from front to back,
  122.     waiting for a keystroke or a mouse click between each depth.
  123.     Pressing the s key again while in this mode turns the
  124.     stepping off and finishes the picture at full speed.
  125. P    (capital P) lets you save the current image as an iff
  126.     ilbm picture file.
  127. O    (capital O) lets you save the surface as an iff tddd 3-d
  128.     object file. These can be loaded into another program
  129.     (object editors and renders like Turbo Silver & Imagine,
  130.     for example). Because of the limit of 64K edges/object
  131.     inherent to the tddd file format surfaces which would
  132.     contain more than that many edges cannot be saved as tddd
  133.     files. (The number of edges is approximately 3 times the
  134.     number vertices, which is itself
  135.     floor((U Max-U Min)/U Step + 1)*floor((V Max-V Min)/V Step + 1)
  136.  
  137. 1 through 7 above the alphabetic section of the keyboard select the
  138. rendering mode. They are
  139.  
  140. 1    Wireframe
  141. 2    Colored solid
  142. 3    black solid with colored edges
  143. 4    Colored solid with colored edges (my favorite)
  144. 5    Colored solid with black edges
  145. 6    Dots
  146. 7    Nebula (sort of a solid dots mode)
  147.  
  148. Since the Nebula mode requires 1 byte/pixel of memory in addition
  149. to the usual requirements of all the modes, you may not have
  150. enough memory available to use it (this can happen easily on 1/2
  151. and 1 meg machines while in hires), in which case uvSurf will
  152. switch back to Dots mode automatically.
  153.  
  154. And the "arrow keys" on the numeric key pad are used to rotate
  155. the surface.
  156.  
  157. 4 and 6 rotate it left and rightwards.
  158. 8 and 2 rotate it up and downwards.
  159. 7 and 9 rotate it counterclockwise and clockwisewards.
  160. 0 resets the rotation to the initial position (Z towards you, X towards
  161.   the right and Y towards the top)
  162.  
  163. And clicking on or near a vertex will show you the (u,v) and
  164. (x,y,z) coordinates of that vertex. Note that in dots mode the dot
  165. is at the center of the quadrangle, and thus is not a vertex.
  166. Therefore the click thing and the dot mode don't work best together.
  167.  
  168.  
  169. Since the orientation of the surface and all the other image parameters
  170. are preserved when you return to the "enter equations" page, you can
  171. generate the surface sparcely (with large u Step and v Step), get it
  172. the way you want it, and then go back, lower the v and v Steps, and
  173. see the same picture but with more quadrangles.
  174.  
  175.  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  176.  
  177. uvSurf uses the mathieeedoubbas.library and the
  178. mathieeedoubtrans.library for its floating-point math, the
  179. diskfont.library for finding fonts, the icon.library to look at its
  180. tooltypes when started from workbench, and either the arp.library
  181. or the asl.library for its filerequester. It will not run without
  182. both math libraries being available.
  183.  
  184. Memory requirements:
  185. 4  bitplanes chip ram for the screen.
  186. 36 bytes/vertex during computations.
  187. 28 bytes/vertex during displaying.
  188. 1  extra bitplane in chip ram the size of the image area for any of
  189.    the solid modes (nebula is not a solid mode---at least not in this sense)
  190. 1  extra byte/pixel in the image area for nebula mode.
  191. and assorted little odds and ends of memory all over the place.
  192.  
  193. This program is based on a BASIC program by Herman Rusius which showed
  194. the roman surface and his ideas, encouragement and hospitality.
  195.  
  196. Thanks also to Marcus Damberger for his suggestions and Ed Serbe for
  197. his help in testing the `save TDDD IFF 3-d object file' feature.
  198.  
  199.  =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  200.  
  201.